<!----------------------------------------------------
ページ名：ClubEditConfirmation.jsp
所　　属：H3A1 04
名　　前：大瀬碩
説　　明：クラブ情報編集を確認するページ
------------------------------------------------------>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="java.sql.*"%>
    <%@page import="java.io.*"%>
<%@page import="java.util.Properties"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/bootstrap.min.css" rel="stylesheet">
<title>編集確認画面</title>
</head>
<body>
<!-- ナビゲーションバー -->
<div class="navbar navbar-default">
  <div class="navbar-header">
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <a class="navbar-brand" href="index.jsp"><img alt="" src="images/logo2.png"></a>
  </div>
  <div class="navbar-collapse collapse">
    <ul class="nav navbar-nav">
      <li><a href="TimetableClassSelection.jsp">時間割情報</a></li>
      <li class="active"><a href="ClubList.jsp">部活動情報</a></li>
      <li><a href="SupplementaryClasses.jsp">振り替え補講</a></li>
      <li><a href="HolidayAttendance.jsp">土日出校申請</a></li>
      <li><a href="AttendanceHistory.jsp">出席履歴</a></li>
    </ul>
    <ul class="nav navbar-nav navbar-right">
      <li><a href="<%out.print(request.getContextPath());%>/Logout">ログアウト</a></li>
    </ul>
  </div>
</div>
	<h1 align="center">部活動情報編集確認</h1>
	<h3 align="center">送信内容が正しいか確認し「確認」ボタンを押してください</h3>
	<br>
	<br>
	<h1 align="center"><%
	
	//クラブ名表示
	ServletContext context = this.getServletContext();
	String path = context.getRealPath("/WEB-INF/connect.properties");
	
	InputStream in = new FileInputStream(path);
	Properties properties = new Properties();
	properties.load(in);
	in.close();
	
	HttpSession sess = request.getSession(true);
	Object sel_club = sess.getAttribute("sel_club");
	Class.forName("com.mysql.jdbc.Driver");
	Connection conn = null;
	String url = properties.getProperty("key1");
	String user = properties.getProperty("key2");
	String password = properties.getProperty("key3");
	conn = DriverManager.getConnection(url, user, password);
	Statement stmt = conn.createStatement();
	String sql = "SELECT * FROM club WHERE club_id = "+sel_club;
	ResultSet rs = stmt.executeQuery(sql);
	while(rs.next()){
		out.print(rs.getString("club_name"));
	}
	rs.close();
	stmt.close();
	conn.close();
	%></h1>
	<div class="container">
		<div class="col-md-6 col-md-offset-3" align="center">
			<table class="table table-bordered" style="font-size: large" align="center">
				<tr>
					<th>活動日時</th>
					<td>${ doa }</td>
				</tr>
				
				<tr>
					<th>活動場所</th>
					<td>${ poa }</td>
				</tr>
				
				<tr>
					<th>活動内容</th>
					<td>${ act }</td>
				</tr>
			</table>
		</div>
	</div>
	<div align="center">
		<a href="javascript:history.back();" class="btn btn-lg btn-danger"><i class="glyphicon glyphicon-arrow-left"><br>戻る</i></a>
		<a href="CEC_Jump.jsp"><button class="btn btn-lg btn-danger glyphicon glyphicon-upload" type="submit"><br>送信</button></a>
	</div>
</body>
</html>